<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>服务监控</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  
<body>
<div class="container-fluid p-t-15">

    <div class="row">
        <div class="col-lg-6">
            <div class="card">
                <div class="card-header">
                    <h4>CPU信息</h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th>值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>核心数</td>
                                <td>${server.cpu.cpuNum}</td>
                            </tr>
                            <tr>
                                <td>用户使用率</td>
                                <td>${server.cpu.used + '%'}</td>
                            </tr>
                            <tr>
                                <td>系统使用率</td>
                                <td>${server.cpu.sys + '%'}</td>
                            </tr>
                            <tr>
                                <td>当前空闲率</td>
                                <td>${server.cpu.free + '%'}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="card">
                <div class="card-header">
                    <h4>内存信息</h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>属性</th>
                                <th>内存</th>
                                <th>JVM</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>总内存</td>
                                <td>${server.mem.total + 'G'}</td>
                                <td>${server.jvm.total + 'M'}</td>
                            </tr>
                            <tr>
                                <td>已用内存</td>
                                <td>${server.mem.used + 'G'}</td>
                                <td>${server.jvm.used + 'M'}</td>
                            </tr>
                            <tr>
                                <td>剩余内存</td>
                                <td>${server.mem.free + 'G'}</td>
                                <td>${server.jvm.free + 'M'}</td>
                            </tr>
                            <tr>
                                <td>使用率</td>
                                <td>[[${server.mem.usage}]]%</td>
                                <td>[[${server.jvm.usage}]]%</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4>服务器信息</h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>服务器名称</th>
                                <th>操作系统</th>
                                <th>服务器IP</th>
                                <th>系统架构</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>${server.sys.computerName}</td>
                                <td>${server.sys.osName}</td>
                                <td>${server.sys.computerIp}</td>
                                <td>${server.sys.osArch}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4>Java虚拟机信息</h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>Java名称</th>
                                <th>Java版本</th>
                                <th>启动时间</th>
                                <th>运行时长</th>
                                <th>安装路径</th>
                                <th>项目路径</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>${server.jvm.name}</td>
                                <td>${server.jvm.version}</td>
                                <td>${server.jvm.startTime}</td>
                                <td>${server.jvm.runTime}</td>
                                <td>${server.jvm.home}</td>
                                <td>${server.sys.userDir}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4>磁盘状态</h4>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                            <tr>
                                <th>盘符路径</th>
                                <th>文件系统</th>
                                <th>盘符类型</th>
                                <th>总大小</th>
                                <th>可用大小</th>
                                <th>已用大小</th>
                                <th>已用百分比</th>
                            </tr>
                            </thead>
                            <tbody>
                            <#list server.sysFiles as sysFile>
                            <tr>
                                <td>${sysFile.dirName}</td>
                                <td>${sysFile.sysTypeName}</td>
                                <td>${sysFile.typeName}</td>
                                <td>${sysFile.total}</td>
                                <td>${sysFile.free}</td>
                                <td>${sysFile.used}</td>
                                <td>${sysFile.usage}</td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>